
<?php
$localhost='localhost';
$name='root';
$pwd='root';
$conn=mysqli_connect($localhost,$name,$pwd);
if($conn){
echo "连接成功！";
}else{
    die("错误是：".mysqli_connect_error());
}
mysqli_set_charset($conn,'utf-8');
?>